package comp302.prototype.xml;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;

import comp302.prototype.slide.SlideController;

public class XMLConstructor {
	private File file;

	public XMLConstructor(String fileName) {
		file = new File(fileName);
	}

	public void write(SlideController slideController) {
		PrintStream ps = null;
		
		try {
			ps = new PrintStream(file);
		} catch (Exception e) {
			e.printStackTrace();
		} finally {
			ps.print("<?xml version=\"1.0\"?>");
			ps.print(slideController);
			ps.close();
		}
	}
}
